package com.zc.timedown.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zc.common.annotation.Excel;
import com.zc.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.time.LocalDateTime;

/**
 * 今日计划子项明细对象 today_plan_item
 * 
 * @author zc
 * @date 2025-09-30
 */
public class TodayPlanItem extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 外键：关联 today_plan.id */
    @Excel(name = "外键：关联 today_plan.id")
    private Long planId;

    /** 外键：关联 today_goal.id */
    @Excel(name = "外键：关联 today_goal.id")
    private Long goalId;

    /** 是否已完成（0=未完成，1=已完成） */
    @Excel(name = "是否已完成", readConverterExp = "0==未完成，1=已完成")
    private Integer isCompleted;

    /** 完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
    private LocalDateTime completedTime;

    /** 排序顺序 */
    @Excel(name = "排序顺序")
    private Integer sortOrder;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setPlanId(Long planId) 
    {
        this.planId = planId;
    }

    public Long getPlanId() 
    {
        return planId;
    }
    public void setGoalId(Long goalId) 
    {
        this.goalId = goalId;
    }

    public Long getGoalId() 
    {
        return goalId;
    }
    public void setIsCompleted(Integer isCompleted)
    {
        this.isCompleted = isCompleted;
    }

    public Integer getIsCompleted()
    {
        return isCompleted;
    }
    public void setCompletedTime(LocalDateTime completedTime)
    {
        this.completedTime = completedTime;
    }

    public LocalDateTime getCompletedTime()
    {
        return completedTime;
    }
    public void setSortOrder(Integer sortOrder)
    {
        this.sortOrder = sortOrder;
    }

    public Integer getSortOrder()
    {
        return sortOrder;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("planId", getPlanId())
            .append("goalId", getGoalId())
            .append("isCompleted", getIsCompleted())
            .append("completedTime", getCompletedTime())
            .append("remark", getRemark())
            .append("sortOrder", getSortOrder())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
